\(\int \frac {\cos ^2(c+d x) \cot ^4(c+d x)}{(a+a \sin (c+d x))^3} \, dx\) [650]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [B] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 29, antiderivative size = 72 \[ \int \frac {\cos ^2(c+d x) \cot ^4(c+d x)}{(a+a \sin (c+d x))^3} \, dx=\frac {5 \text {arctanh}(\cos (c+d x))}{2 a^3 d}-\frac {4 \cot (c+d x)}{a^3 d}-\frac {\cot ^3(c+d x)}{3 a^3 d}+\frac {3 \cot (c+d x) \csc (c+d x)}{2 a^3 d} \]

[Out]

5/2*arctanh(cos(d*x+c))/a^3/d-4*cot(d*x+c)/a^3/d-1/3*cot(d*x+c)^3/a^3/d+3/2*cot(d*x+c)*csc(d*x+c)/a^3/d

Rubi [A] (verified)

Time = 0.15 (sec) , antiderivative size = 72, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {2948, 2836, 3855, 3852, 8, 3853} \[ \int \frac {\cos ^2(c+d x) \cot ^4(c+d x)}{(a+a \sin (c+d x))^3} \, dx=\frac {5 \text {arctanh}(\cos (c+d x))}{2 a^3 d}-\frac {\cot ^3(c+d x)}{3 a^3 d}-\frac {4 \cot (c+d x)}{a^3 d}+\frac {3 \cot (c+d x) \csc (c+d x)}{2 a^3 d} \]

[In]

Int[(Cos[c + d*x]^2*Cot[c + d*x]^4)/(a + a*Sin[c + d*x])^3,x]

[Out]

(5*ArcTanh[Cos[c + d*x]])/(2*a^3*d) - (4*Cot[c + d*x])/(a^3*d) - Cot[c + d*x]^3/(3*a^3*d) + (3*Cot[c + d*x]*Cs
c[c + d*x])/(2*a^3*d)

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2836

Int[((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.), x_Symbol] :> Int[Expan
dTrig[(a + b*sin[e + f*x])^m*(d*sin[e + f*x])^n, x], x] /; FreeQ[{a, b, d, e, f, n}, x] && EqQ[a^2 - b^2, 0] &
& IGtQ[m, 0] && RationalQ[n]

Rule 2948

Int[cos[(e_.) + (f_.)*(x_)]^(p_)*((d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(
m_), x_Symbol] :> Dist[a^(2*m), Int[(d*Sin[e + f*x])^n/(a - b*Sin[e + f*x])^m, x], x] /; FreeQ[{a, b, d, e, f,
 n}, x] && EqQ[a^2 - b^2, 0] && IntegersQ[m, p] && EqQ[2*m + p, 0]

Rule 3852

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Dist[-d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 3853

Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Csc[c + d*x])^(n - 1)/(d*(n
- 1))), x] + Dist[b^2*((n - 2)/(n - 1)), Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n,
 1] && IntegerQ[2*n]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps \begin{align*} \text {integral}& = \frac {\int \csc ^4(c+d x) (a-a \sin (c+d x))^3 \, dx}{a^6} \\ & = \frac {\int \left (-a^3 \csc (c+d x)+3 a^3 \csc ^2(c+d x)-3 a^3 \csc ^3(c+d x)+a^3 \csc ^4(c+d x)\right ) \, dx}{a^6} \\ & = -\frac {\int \csc (c+d x) \, dx}{a^3}+\frac {\int \csc ^4(c+d x) \, dx}{a^3}+\frac {3 \int \csc ^2(c+d x) \, dx}{a^3}-\frac {3 \int \csc ^3(c+d x) \, dx}{a^3} \\ & = \frac {\text {arctanh}(\cos (c+d x))}{a^3 d}+\frac {3 \cot (c+d x) \csc (c+d x)}{2 a^3 d}-\frac {3 \int \csc (c+d x) \, dx}{2 a^3}-\frac {\text {Subst}\left (\int \left (1+x^2\right ) \, dx,x,\cot (c+d x)\right )}{a^3 d}-\frac {3 \text {Subst}(\int 1 \, dx,x,\cot (c+d x))}{a^3 d} \\ & = \frac {5 \text {arctanh}(\cos (c+d x))}{2 a^3 d}-\frac {4 \cot (c+d x)}{a^3 d}-\frac {\cot ^3(c+d x)}{3 a^3 d}+\frac {3 \cot (c+d x) \csc (c+d x)}{2 a^3 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 1.67 (sec) , antiderivative size = 115, normalized size of antiderivative = 1.60 \[ \int \frac {\cos ^2(c+d x) \cot ^4(c+d x)}{(a+a \sin (c+d x))^3} \, dx=-\frac {\csc ^3(c+d x) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^6 \left (30 \cos (c+d x)-22 \cos (3 (c+d x))-60 \left (\log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )-\log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )\right ) \sin ^3(c+d x)-18 \sin (2 (c+d x))\right )}{24 a^3 d (1+\sin (c+d x))^3} \]

[In]

Integrate[(Cos[c + d*x]^2*Cot[c + d*x]^4)/(a + a*Sin[c + d*x])^3,x]

[Out]

-1/24*(Csc[c + d*x]^3*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])^6*(30*Cos[c + d*x] - 22*Cos[3*(c + d*x)] - 60*(Log
[Cos[(c + d*x)/2]] - Log[Sin[(c + d*x)/2]])*Sin[c + d*x]^3 - 18*Sin[2*(c + d*x)]))/(a^3*d*(1 + Sin[c + d*x])^3
)

Maple [A] (verified)

Time = 0.42 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.31

method result size
parallelrisch \(\frac {-\left (\cot ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )+9 \left (\cot ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-9 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )-45 \cot \left (\frac {d x}{2}+\frac {c}{2}\right )-60 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )+45 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{24 a^{3} d}\) \(94\)
derivativedivides \(\frac {\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}-3 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+15 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-20 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {15}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}+\frac {3}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}-\frac {1}{3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}}{8 d \,a^{3}}\) \(98\)
default \(\frac {\frac {\left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3}-3 \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+15 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-20 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )-\frac {15}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}+\frac {3}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}-\frac {1}{3 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}}{8 d \,a^{3}}\) \(98\)
risch \(-\frac {18 i {\mathrm e}^{4 i \left (d x +c \right )}+9 \,{\mathrm e}^{5 i \left (d x +c \right )}-48 i {\mathrm e}^{2 i \left (d x +c \right )}+22 i-9 \,{\mathrm e}^{i \left (d x +c \right )}}{3 a^{3} d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3}}+\frac {5 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{2 d \,a^{3}}-\frac {5 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{2 d \,a^{3}}\) \(112\)
norman \(\frac {-\frac {1}{24 a d}+\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{6 d a}-\frac {\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d a}+\frac {\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )}{2 d a}-\frac {\tan ^{14}\left (\frac {d x}{2}+\frac {c}{2}\right )}{6 d a}+\frac {\tan ^{15}\left (\frac {d x}{2}+\frac {c}{2}\right )}{24 d a}-\frac {400 \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d a}-\frac {95 \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d a}-\frac {137 \left (\tan ^{3}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{12 d a}-\frac {43 \left (\tan ^{11}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d a}-\frac {146 \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d a}-\frac {171 \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{4 d a}-\frac {265 \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{3 d a}-\frac {1119 \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d a}-\frac {3767 \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d a}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} a^{2} \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{5}}-\frac {5 \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{2 d \,a^{3}}\) \(336\)

[In]

int(cos(d*x+c)^6*csc(d*x+c)^4/(a+a*sin(d*x+c))^3,x,method=_RETURNVERBOSE)

[Out]

1/24*(-cot(1/2*d*x+1/2*c)^3+tan(1/2*d*x+1/2*c)^3+9*cot(1/2*d*x+1/2*c)^2-9*tan(1/2*d*x+1/2*c)^2-45*cot(1/2*d*x+
1/2*c)-60*ln(tan(1/2*d*x+1/2*c))+45*tan(1/2*d*x+1/2*c))/a^3/d

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 123, normalized size of antiderivative = 1.71 \[ \int \frac {\cos ^2(c+d x) \cot ^4(c+d x)}{(a+a \sin (c+d x))^3} \, dx=-\frac {44 \, \cos \left (d x + c\right )^{3} - 15 \, {\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 15 \, {\left (\cos \left (d x + c\right )^{2} - 1\right )} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) + 18 \, \cos \left (d x + c\right ) \sin \left (d x + c\right ) - 48 \, \cos \left (d x + c\right )}{12 \, {\left (a^{3} d \cos \left (d x + c\right )^{2} - a^{3} d\right )} \sin \left (d x + c\right )} \]

[In]

integrate(cos(d*x+c)^6*csc(d*x+c)^4/(a+a*sin(d*x+c))^3,x, algorithm="fricas")

[Out]

-1/12*(44*cos(d*x + c)^3 - 15*(cos(d*x + c)^2 - 1)*log(1/2*cos(d*x + c) + 1/2)*sin(d*x + c) + 15*(cos(d*x + c)
^2 - 1)*log(-1/2*cos(d*x + c) + 1/2)*sin(d*x + c) + 18*cos(d*x + c)*sin(d*x + c) - 48*cos(d*x + c))/((a^3*d*co
s(d*x + c)^2 - a^3*d)*sin(d*x + c))

Sympy [F(-1)]

Timed out. \[ \int \frac {\cos ^2(c+d x) \cot ^4(c+d x)}{(a+a \sin (c+d x))^3} \, dx=\text {Timed out} \]

[In]

integrate(cos(d*x+c)**6*csc(d*x+c)**4/(a+a*sin(d*x+c))**3,x)

[Out]

Timed out

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 153 vs. \(2 (66) = 132\).

Time = 0.22 (sec) , antiderivative size = 153, normalized size of antiderivative = 2.12 \[ \int \frac {\cos ^2(c+d x) \cot ^4(c+d x)}{(a+a \sin (c+d x))^3} \, dx=\frac {\frac {\frac {45 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {9 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {\sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}}{a^{3}} - \frac {60 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{3}} + \frac {{\left (\frac {9 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {45 \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - 1\right )} {\left (\cos \left (d x + c\right ) + 1\right )}^{3}}{a^{3} \sin \left (d x + c\right )^{3}}}{24 \, d} \]

[In]

integrate(cos(d*x+c)^6*csc(d*x+c)^4/(a+a*sin(d*x+c))^3,x, algorithm="maxima")

[Out]

1/24*((45*sin(d*x + c)/(cos(d*x + c) + 1) - 9*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + sin(d*x + c)^3/(cos(d*x +
c) + 1)^3)/a^3 - 60*log(sin(d*x + c)/(cos(d*x + c) + 1))/a^3 + (9*sin(d*x + c)/(cos(d*x + c) + 1) - 45*sin(d*x
 + c)^2/(cos(d*x + c) + 1)^2 - 1)*(cos(d*x + c) + 1)^3/(a^3*sin(d*x + c)^3))/d

Giac [A] (verification not implemented)

none

Time = 0.37 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.78 \[ \int \frac {\cos ^2(c+d x) \cot ^4(c+d x)}{(a+a \sin (c+d x))^3} \, dx=-\frac {\frac {60 \, \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right )}{a^{3}} - \frac {110 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 45 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 9 \, \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1}{a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3}} - \frac {a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 9 \, a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 45 \, a^{6} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a^{9}}}{24 \, d} \]

[In]

integrate(cos(d*x+c)^6*csc(d*x+c)^4/(a+a*sin(d*x+c))^3,x, algorithm="giac")

[Out]

-1/24*(60*log(abs(tan(1/2*d*x + 1/2*c)))/a^3 - (110*tan(1/2*d*x + 1/2*c)^3 - 45*tan(1/2*d*x + 1/2*c)^2 + 9*tan
(1/2*d*x + 1/2*c) - 1)/(a^3*tan(1/2*d*x + 1/2*c)^3) - (a^6*tan(1/2*d*x + 1/2*c)^3 - 9*a^6*tan(1/2*d*x + 1/2*c)
^2 + 45*a^6*tan(1/2*d*x + 1/2*c))/a^9)/d

Mupad [B] (verification not implemented)

Time = 9.69 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.65 \[ \int \frac {\cos ^2(c+d x) \cot ^4(c+d x)}{(a+a \sin (c+d x))^3} \, dx=\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,a^3\,d}-\frac {3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,a^3\,d}-\frac {5\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{2\,a^3\,d}+\frac {15\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,a^3\,d}-\frac {{\mathrm {cot}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (15\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+\frac {1}{3}\right )}{8\,a^3\,d} \]

[In]

int(cos(c + d*x)^6/(sin(c + d*x)^4*(a + a*sin(c + d*x))^3),x)

[Out]

tan(c/2 + (d*x)/2)^3/(24*a^3*d) - (3*tan(c/2 + (d*x)/2)^2)/(8*a^3*d) - (5*log(tan(c/2 + (d*x)/2)))/(2*a^3*d) +
 (15*tan(c/2 + (d*x)/2))/(8*a^3*d) - (cot(c/2 + (d*x)/2)^3*(15*tan(c/2 + (d*x)/2)^2 - 3*tan(c/2 + (d*x)/2) + 1
/3))/(8*a^3*d)